// import DataGrid from "@platformComponents/DataGrid.vue"
// import TableInput from "@platformComponents/TableInput.vue"
// import TxtInput from "@platformComponents/TxtInput.vue"
// import TableOutput from "@platformComponents/TableOutput.vue"
// import Default from "@platformComponents/Default.vue"
// import RowGenerator from "@platformComponents/RowGenerator.vue"
// import JsonInput from "@platformComponents/JsonInput.vue"
// import SelectValues from "@platformComponents/SelectValues.vue"
// import Rest from "@platformComponents/Rest.vue"
// import UserDefinedJavaClass from "@platformComponents/UserDefinedJavaClass.vue"
// import ShellScript  from "@platformComponents/ShellScript.vue"
// import WriteToLog from "@platformComponents/WriteToLog.vue"
// import ExecSQL from "@platformComponents/ExecSQL.vue"
// import KafkaInput from "@platformComponents/KafkaInput.vue"
// import RestInput from "@platformComponents/RestInput.vue"
// import JsonParse from"@platformComponents/JsonParse.vue"
// import FTPTextInput from "@platformComponents/FTPTextInput.vue"
// import SystemInfo from "@platformComponents/SystemInfo.vue"
// import ReplaceString from "@platformComponents/ReplaceString.vue"
// import FieldSplitter from "@platformComponents/dataoperation/FieldSplitter.vue"
// import ConcatFields from "@platformComponents/dataoperation/ConcatFields.vue"
import { defineAsyncComponent } from 'vue';

const components = {
  DataGrid: () => import('@platformComponents/DataGrid.vue'),
  TableInput: () => import('@platformComponents/TableInput.vue'),
  TxtInput: () => import('@platformComponents/TxtInput.vue'),
  TableOutput: () => import('@platformComponents/TableOutput.vue'),
  Default: () => import('@platformComponents/Default.vue'),
  RowGenerator: () => import('@platformComponents/RowGenerator.vue'),
  JsonInput: () => import('@platformComponents/JsonInput.vue'),
  SelectValues: () => import('@platformComponents/SelectValues.vue'),
  Rest: () => import('@platformComponents/Rest.vue'),
  UserDefinedJavaClass: () => import('@platformComponents/UserDefinedJavaClass.vue'),
  ShellScript: () => import('@platformComponents/ShellScript.vue'),
  WriteToLog: () => import('@platformComponents/WriteToLog.vue'),
  ExecSQL: () => import('@platformComponents/ExecSQL.vue'),
  KafkaInput: () => import('@platformComponents/KafkaInput.vue'),
  RestInput: () => import('@platformComponents/RestInput.vue'),
  JsonParse: () => import('@platformComponents/JsonParse.vue'),
  FTPTextInput: () => import('@platformComponents/FTPTextInput.vue'),
  SystemInfo: () => import('@platformComponents/SystemInfo.vue'),
  ReplaceString: () => import('@platformComponents/ReplaceString.vue'),
  FieldSplitter: () => import('@platformComponents/dataoperation/FieldSplitter.vue'),
  ConcatFields: () => import('@platformComponents/dataoperation/ConcatFields.vue')
};

export default {
  install(Vue) {
    Object.keys(components).forEach((key) => {
      Vue.component(key, defineAsyncComponent(components[key]));
    });
    // Vue.component('DataGrid', DataGrid);
    // Vue.component('TableInput', TableInput);
    // Vue.component('TxtInput', TxtInput);
    // Vue.component('TableOutput', TableOutput);
    // Vue.component('Default', Default);
    // Vue.component('RowGenerator', RowGenerator);
    // Vue.component('JsonInput', JsonInput);
    // Vue.component('SelectValues', SelectValues);
    // Vue.component('Rest', Rest);
    // Vue.component('UserDefinedJavaClass', UserDefinedJavaClass);
    // Vue.component('ShellScript', ShellScript);
    // Vue.component('WriteToLog', WriteToLog);
    // Vue.component('ExecSQL', ExecSQL);
    // Vue.component('KafkaInput', KafkaInput);
    // Vue.component('RestInput', RestInput);
    // Vue.component('JsonParse', JsonParse);
    // Vue.component('FTPTextInput', FTPTextInput);
    // Vue.component('SystemInfo', SystemInfo);
    // Vue.component('ReplaceString', ReplaceString);
    // Vue.component('FieldSplitter', FieldSplitter);
    // Vue.component('ConcatFields', ConcatFields);
  }
};
